{% extends 'TopxiaWebBundle::bootstrap-modal-layout.html.twig' %}

{% block title %}提交问题{% endblock %}

{% block body %}
 <form id="lesson-question-plugin-form" method="post" action="{{ path('course_lesson_plugin_question_ask') }}">

  <div class="form-group">
    <div class="controls">
      {{ form_widget(form.title, {attr:{class:'form-control expand-form-trigger', placeholder:'我要提问', 'data-display':'标题'}}) }}
    </div>
  </div>

  <div class="form-group detail-form-group">
    <div class="controls">
      {{ form_widget(form.content, {attr:{class:'form-control', rows:5, placeholder:'详细描述你的问题', 'data-image-upload-url': path('editor_upload', {token:upload_token('course')}) }}) }}
    </div>
  </div>

  {{ form_rest(form) }}
  <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
</form>
<script>
    app.load('lesson-question/ask');
</script>

{% endblock %}
{% block footer %}
  <button type="button" class="btn btn-link" data-dismiss="modal">取消</button>
  <button type="submit" class="btn btn-primary pull-right" data-toggle="form-submit" data-target="#lesson-question-plugin-form">提问</button>
{% endblock %}